Skip to content

Conversation

davidtwco
Copy link
Member

There are a handful of files that I often find in my local working directories that I never want to commit that aren't covered in the .gitignore file:

/mir_dump:
Default output location from -Z mir-dump=all for a specific test, I can't think of a reason why this should ever be commited.

tags*/TAGS*:
I use vim-gutentags which outputs tags and tags.temp which I don't want commited. I also collapsed the TAGS, TAGS.vi, TAGS.emacs into TAGS*.

Session.vim:
I use vim-obsession to save my current session in Vim, it outputs a Session.vim file, this also shouldn't be commited.

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 22, 2018
.gitignore Outdated
TAGS.emacs
TAGS.vi
tags*
TAGS*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe TAGS and TAGS.*? this "open-ended glob" makes me a touch nervous for some silly reason

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this.

.gitignore Outdated
@@ -69,6 +69,7 @@ __pycache__/
/doc
/inst/
/llvm/
/mir_dump
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wind up with mir_dump directories scattered al over (e.g., often in src/test/ui) -- maybe we can make this a more general case? I forget what leading / means though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, the / just makes it match from the root of the repository. I've removed the / so it should match anywhere in the tree.

.gitignore Outdated
\#*
\#*\#
config.mk
config.stamp
keywords.md
lexer.ml
Session.vim
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might make sense to add this to your personal ~/.gitignore (that is where I have e.g. *~, which rules out emacs backup files). But I don't really mind putting it here also.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do that, I forgot that's a thing you could do. I'll leave it here though because it doesn't hurt.

@Mark-Simulacrum
Copy link
Member

@bors r=nikomatsakis,Mark-Simulacrum rollup

@bors
Copy link
Collaborator

bors commented Jul 22, 2018

📌 Commit c645ecd has been approved by nikomatsakis,Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 22, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Jul 22, 2018
…atsakis,Mark-Simulacrum

Added new lines to .gitignore.

There are a handful of files that I often find in my local working directories that I never want to commit that aren't covered in the `.gitignore` file:

`/mir_dump`:
Default output location from `-Z mir-dump=all` for a specific test, I can't think of a reason why this should ever be commited.

`tags*`/`TAGS*`:
I use `vim-gutentags` which outputs `tags` and `tags.temp` which I don't want commited. I also collapsed the `TAGS`, `TAGS.vi`, `TAGS.emacs` into `TAGS*`.

`Session.vim`:
I use `vim-obsession` to save my current session in Vim, it outputs a `Session.vim` file, this also shouldn't be commited.
bors added a commit that referenced this pull request Jul 22, 2018
Rollup of 11 pull requests

Successful merges:

 - #51807 (Deprecation of str::slice_unchecked(_mut))
 - #52051 (mem::swap the obvious way for types smaller than the SIMD optimization's block size)
 - #52465 (Add CI test harness for `thumb*` targets. [IRR-2018-embedded])
 - #52507 (Reword when `_` couldn't be inferred)
 - #52508 (Document that Unique::empty() and NonNull::dangling() aren't sentinel values)
 - #52521 (Fix links in rustdoc book.)
 - #52581 (Avoid using `#[macro_export]` for documenting builtin macros)
 - #52582 (Typo)
 - #52587 (Add missing backtick in UniversalRegions doc comment)
 - #52594 (Run the error index tool against the sysroot libdir)
 - #52615 (Added new lines to .gitignore.)
@bors bors merged commit c645ecd into rust-lang:master Jul 22, 2018
@davidtwco davidtwco deleted the add-to-gitignore branch July 23, 2018 09:24
@RalfJung
Copy link
Member

RalfJung commented Aug 6, 2019

There are a handful of files that I often find in my local working directories that I never want to commit that aren't covered in the .gitignore file:

I don't think that's enough of a justification to leave these files as junk in everyones working dir. If you have some files you want to ignore, just add them to .git/info/exclude. The .gitignore is only for files everyone should ignore, and I personally prefer to clean up the junk over keeping it.

Cc #63307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants